#include "Diagnostic.h"

using llvm::SourceMgr;

namespace {
    const char *DiagnosticText[] = {
        #define DIAG(ID, Level, Msg) Msg,
        #include "Diagnostic.def"
    };
    llvm::SourceMgr::DiagKind DiagnosticKind[] = {
        #define DIAG(ID, Level, Msg) SourceMgr::DK_##Level,
        #include "Diagnostic.def"
    };
}

const char * getDiagnosticText(unsigned DiagID) {
  return DiagnosticText[DiagID];
}

llvm::SourceMgr::DiagKind getDiagnosticKind(unsigned DiagID) {
  return DiagnosticKind[DiagID];
}